﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>1</title>
    <!--<link rel="stylesheet" href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
    <script src="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script>-->

    <link rel="stylesheet" type="text/css" href="http://unpkg.com/iview/dist/styles/iview.css">
    <script type="text/javascript" src="http://v1.vuejs.org/js/vue.min.js"></script>
    <script type="text/javascript" src="http://unpkg.com/iview@1.0.1/dist/iview.min.js"></script>


    <link rel="stylesheet" href="../css/bootstrap.min.css">
    <script src="../js/bootstrap.min.js"></script>
</head>
<body>
 <h1>Hello, world!</h1>
    <button class="btn btn-info" onclick="cefCustomObject.showDevTools();">Open Chrome Dev Tools</button>
    <button class="btn btn-primary" onclick="cefCustomObject.opencmd();">Open cmd.exe</button>


    <div id="app">
        <h1>Hello, world!</h1>
        <div v-for="item in sbList">
            <Checkbox :checked.sync="item.isChecked" :value="item.id" ></Checkbox>
            <p>name:{{item.name}}</p>
        </div>
        <button @click="clickButton">submit</button>
    </div>
    <script>
        var vm = new Vue({
            el: '#app',
            data: {
                sbList: [{ id: 1, name: 'zhangsan1', isChecked: false },
                    { id: 2, name: 'zhangsan2', isChecked: false }, { id: 3, name: 'zhangsan3', isChecked: false }, { id: 4, name: 'zhangsan4', isChecked: false}],

            },
            methods:{
                clickButton: function () {
                    var getList =[];
                    for (var i=0; i < this.sbList.length;i++) {
                        if (this.sbList[i].isChecked) {
                            getList.push(this.sbList[i]);
                        }
                    }
                    console.log(getList);
                }
            }
        })

    </script>

</body>
</html>